﻿using CPF;
using CPF.Animation;
using CPF.Charts;
using CPF.Controls;
using CPF.Drawing;
using CPF.Shapes;
using CPF.Styling;
using CPF.Svg;
using CPFUI.IControl;
using CPFUI.IControl.Process;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Net.Mime.MediaTypeNames;

namespace CPFUIDemo
{
    public class Window3 : Window
    {
        protected override void InitializeComponent()
        {
            LoadStyleFile("res://CPFUIDemo/Stylesheet1.css");
            //加载样式文件，文件需要设置为内嵌资源
            CornerRadius = new CornerRadius(14);
            Title = "软键盘";
            TopMost = true;
            CanActivate = false;
            Background = null;
            Width= 500;
            Height= 500;
            Children.Add(new WindowFrame(this, new Panel
            {
                Width = "100%",
                Height = "100%",
                Children = //内容元素放这里
                {
                    new CircularProgress
                    {
                        TickColor=Color.OrangeRed,
                        Rotation=Direction.Anticlockwise,
                        MarginLeft = 57,
                        MarginTop = 45,
                        Width=100,
                        Height=100,
                        Interval=60
                    },
                    new CircularProgress
                    {
                        TickColor=Color.Green,
                        Rotation=Direction.Anticlockwise,
                        GraphType=GraphType.Ellipse,
                        MarginLeft = 157,
                        MarginTop = 45,
                        Width=100,
                        Height=100,
                        Interval=60
                    },
                    new CircularProgress
                    {
                        TickColor=Color.Black,
                        Rotation=Direction.Clockwise,
                        MarginLeft = 257,
                        MarginTop = 45,
                        Width=100,
                        Height=100,
                        Interval=60
                    },
                    new CircularProgress
                    {
                        TickColor=Color.DodgerBlue,
                        Rotation=Direction.Clockwise,
                        GraphType=GraphType.Ellipse,
                        IsChangeSize=true,
                        MarginLeft = 357,
                        MarginTop = 45,
                        Width=100,
                        Height=100,
                        Interval=60
                    },
                    new ProgressBar
                    {

                        PlayAnimationOnAddTrigger=true,
                        MarginLeft = 57,
                        MarginTop = 185,
                        Width=400,
                        Height=20,
                        Value=50,
                       
                    },
                }
            })
            {
            });
            if (!DesignMode)//设计模式下不执行，也可以用#if !DesignMode
            {
                
            }
        }
#if !DesignMode //用户代码写到这里，设计器下不执行，防止设计器出错
        protected override void OnInitialized()
        {
            base.OnInitialized();

        }
        //用户代码

#endif
    }
}
